;(function() {
    // 步骤3：创建echarts实例
    let myChart = echarts.init(document.querySelector('.column3 .box3'))

    // 步骤4：定义配置（指定图表的配置项和数据）
    option = {
      graphic: {
        elements: [
          {
            type: 'group',
            left: 'center',
            top: 'center',
            children: new Array(7).fill(0).map((val, i) => ({
              type: 'rect',
              x: i * 20,
              shape: {
                x: 0,
                y: -40,
                width: 10,
                height: 80
              },
              style: {
                fill: '#5470c6'
              },
              keyframeAnimation: {
                duration: 1000,
                delay: i * 200,
                loop: true,
                keyframes: [
                  {
                    percent: 0.5,
                    scaleY: 0.3,
                    easing: 'cubicIn'
                  },
                  {
                    percent: 1,
                    scaleY: 1,
                    easing: 'cubicOut'
                  }
                ]
              }
            }))
          }
        ]
      }
    };

    // 步骤5：使用刚指定的配置项和数据显示图表
    myChart.setOption(option)

    // window.onresize = () => {
    //     myChart.resize()
    // }   

    window.addEventListener('resize', () => {
        myChart.resize()
    })
})()